package com.agent.common.entity;

import com.agent.common.constant.CommonConstants;
import lombok.Data;

/**
 * 用户上下文信息
 */
@Data
public class UserContext {
    private Long userId;
    private String username;
    private String membershipType;
    private String subscriptionType;
    private Integer remainingCredits;
    private String avatarUrl;
    private String email;
    private Boolean isAdmin;
    
    public boolean isFreeUser() {
        return CommonConstants.MEMBER_FREE.equals(membershipType);
    }
    
    public boolean isBasicUser() {
        return CommonConstants.MEMBER_BASIC.equals(membershipType);
    }
    
    public boolean isProUser() {
        return CommonConstants.MEMBER_PRO.equals(membershipType);
    }
    
    public boolean isMaxUser() {
        return CommonConstants.MEMBER_MAX.equals(membershipType);
    }
}